package com.itheima.HomeWork.Demo01;

public interface StringHandler {
    void printMessage(int i);
}
class StringHandlerDemo{
    public void useStringHandler(StringHandler stringHandler){
        int i=0;
        stringHandler.printMessage(i);
    }
}
 class LambdTest2{
     public static void main(String[] args) {
//         new StringHandlerDemo().useStringHandler(new StringHandler(){
//             @Override
//             public void printMessage(int i) {
//                 System.out.println("哈哈哈");
//             }
//         });
         new StringHandlerDemo().useStringHandler(i -> System.out.println("哈哈哈"));
     }
}